﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Vaffanculo.Model.Entities;
using Vaffanculo.Service.Infrastructure;
using Vaffanculo.Business.Managers;
using Vaffanculo.Business.Interfaces;

namespace Vaffanculo.Service
{
    /// <summary>
    /// Provide services with type Project entity 
    /// </summary>
    public class ProjectService : BaseService
    {
        /// <summary>
        /// Create new Project
        /// </summary>
        /// <param name="project">Project Entity</param>
        /// <returns>Project</returns>
        public Project NewProject(Project project)
        {
            ExecuteManager(uow =>
                {
                    IProjectManager manager = new ProjectManager(uow);
                    manager.AddProject(project);
                }
            );

            return project;
        }
    }
}
